package com.youzan.cloud.dataobject;

import java.util.Date;

/**
 * 配置表
 */
public class ComponentConfig {
	/** 主键 */
	private Integer id;
	/** 配置项名称 */
	private String name;
	/** 配置项内容: JSON/TEXT格式 */
	private String config;
	/** 创建时间 */
	private Date createdAt;
	/** 更新时间 */
	private Date updatedAt;
	/** 组件域 */
	private String schemaName;

	public void setId(Integer id) {
		this.id = id;
	}
	
	public Integer getId() {
		return this.id;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getName() {
		return this.name;
	}
	
	public void setConfig(String config) {
		this.config = config;
	}
	
	public String getConfig() {
		return this.config;
	}
	
	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}
	
	public Date getCreatedAt() {
		return this.createdAt;
	}
	
	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}
	
	public Date getUpdatedAt() {
		return this.updatedAt;
	}
	
	public void setSchemaName(String schema) {
		this.schemaName = schema;
	}
	
	public String getSchemaName() {
		return this.schemaName;
	}
	

	@Override
    public boolean equals(Object o) {
        if (this == o) { return true; }
        if (o == null || getClass() != o.getClass()) {return false;}
        ComponentConfig that = (ComponentConfig) o;
        return id.equals(that.id);
    }

    @Override
    public int hashCode() {
        return java.util.Objects.hash(id);
    }
    
    @Override
    public String toString() {
        return "ComponentConfig{" +
				"id=" + id +
						",name='" + name + "'" + 
						",config='" + config + "'" + 
						",createdAt='" + createdAt + "'" + 
						",updatedAt='" + updatedAt + "'" + 
						",schemaName='" + schemaName + "'" +
		                '}';
    }
	
}